package com.thor.palmmall.hdmall.user.impl;

import com.thor.commons.exception.ThorServiceException;
import com.thor.palmmall.hdmall.common.HDMBaseServiceImpl;
import com.thor.palmmall.hdmall.user.HDMUser;
import com.thor.palmmall.hdmall.user.HDMUserAuthParam;
import com.thor.palmmall.hdmall.user.HDMUserAuthResp;
import com.thor.palmmall.hdmall.user.HDMUserService;

public class HDMUserServiceImpl extends HDMBaseServiceImpl implements HDMUserService {

  @Override
  public HDMUser authen(HDMUserAuthParam authen) throws ThorServiceException {
    HDMUserAuthResp response = post("/api/user/authen", authen, HDMUserAuthResp.class);
    if (response != null) {
      return response.getData();
    }
    return null;
  }
}
